<?php

namespace App\Modules\Company\Controller;

use App\Modules\BaseController;
use App\Modules\Company\Repository\CompanyRepository;
use App\Modules\Company\Request\CompanyIndexRequest;
use Hyperf\Di\Annotation\Inject;

/**
 * 只能在Controller目录下使用注解路由  否则403, 能解析到这里 但是不能访问
 */
class CompanyController extends BaseController
{
    /**
     * @Inject()
     * @var CompanyRepository
     */
    protected $repository;

    public function index(CompanyIndexRequest $request)
    {
        return $this->response->success($this->repository->index($request));
    }
}